]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
[PR debug/67192] Fix C loops' back-jump location
[gcc.git] / gcc / c / ChangeLog
CommitLineData
f6b0b3db
AA
12015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2
3 PR debug/67192
4 * c-parser.c (c_parser_while_statement): Finish the loop before
5 parsing ahead for misleading indentation.
6 (c_parser_for_statement): Likewise.
7
ee45a32d
EB
82015-11-08 Eric Botcazou <ebotcazou@adacore.com>
9
10 * c-decl.c (finish_struct): If the structure has reverse storage
11 order, rewrite the type of array fields with scalar component. Call
12 maybe_apply_pragma_scalar_storage_order on entry.
13 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
14 errors on bit-fields and reverse SSO here and not...
15 (c_mark_addressable): ...here.
16 (output_init_element): Adjust call to initializer_constant_valid_p.
17 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
18
8a645150
DM
192015-11-06 David Malcolm <dmalcolm@redhat.com>
20
21 * c-decl.c (warn_defaults_to): Update for change in signature
22 of diagnostic_set_info.
23 * c-errors.c (pedwarn_c99): Likewise.
24 (pedwarn_c90): Likewise.
25 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
26 for textinfo::set_location.
27
7a5e4956
CP
282015-11-05 Cesar Philippidis <cesar@codesourcery.com>
29 Thomas Schwinge <thomas@codesourcery.com>
30 James Norris <jnorris@codesourcery.com>
31
32 * c-parser.c (c_parser_omp_clause_name): Add support for
33 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
34 (c_parser_omp_clause_default): Add is_oacc argument. Handle
35 default(none) in OpenACC.
36 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
37 arguments.
38 (c_parser_oacc_clause_tile): New function.
39 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
40 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
41 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
42 TILE}.
43 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
44 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
45 FIRSTPRIVATE}.
46 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
47 (c_parser_oacc_update): Update the error message for missing clauses.
48 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
49 and OMP_CLAUSE_INDEPENDENT.
50
bfcfbfa0
MP
512015-11-05 Marek Polacek <polacek@redhat.com>
52
53 PR c/68090
54 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
55 deal with pre-evaluation on invalid types.
56
e01d41e5
JJ
572015-11-05 Jakub Jelinek <jakub@redhat.com>
58 Ilya Verbin <ilya.verbin@intel.com>
59
60 * c-parser.c: Include context.h and gimple-expr.h.
61 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
62 monotonic together with nonmonotonic.
63 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
64 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
65 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
66 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
67 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
68 expressions on combined target teams before the target.
69 (c_parser_omp_declare_target): If decl has "omp declare target" or
70 "omp declare target link" attribute, and cgraph or varpool node already
71 exists, then set corresponding flags. Call c_finish_omp_clauses
72 in the parenthesized extended-list syntax case.
73 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
74 declare target.
75 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
76 on OMP_CLAUSE_REDUCTION array sections.
77 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
78 into the constant offset, or for variable low-bound using
79 POINTER_PLUS_EXPR. For structure element based array sections use
80 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
81 (c_finish_omp_clauses): Drop generic_field_head, structure
82 elements are now always mapped even as array section bases,
83 diagnose same var in data sharing and mapping clauses. Diagnose if
84 linear step on declare simd is neither a constant nor a uniform
85 parameter. Look through POINTER_PLUS_EXPR for array section
86 reductions. Diagnose the same var or function appearing multiple
87 times on the same directive. Fix up wording for the to clause if t
88 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
89 modifier on kinds other than dynamic or guided or nonmonotonic
90 modifier together with ordered clause.
91
4bf9e5a8
TS
922015-11-03 Thomas Schwinge <thomas@codesourcery.com>
93 Chung-Lin Tang <cltang@codesourcery.com>
94
95 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
96
2adfab87
AM
972015-10-29 Andrew MacLeod <amacleod@redhat.com>
98
99 * c-array-notation.c: Reorder #include's and remove duplicates.
100 * c-aux-info.c: Likewise.
101 * c-convert.c: Likewise.
102 * c-decl.c: Likewise.
103 * c-errors.c: Likewise.
104 * c-lang.c: Likewise.
105 * c-objc-common.c: Likewise.
106 * c-parser.c: Likewise.
107 * c-typeck.c: Likewise.
108
e922069e
JW
1092015-10-26 Jim Wilson <jim.wilson@linaro.org>
110
111 PR debug/66068
112 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
113 after calling build_qualified_type.
114
765dd391
CP
1152015-10-27 Cesar Philippidis <cesar@codesourcery.com>
116 Thomas Schwinge <thomas@codesourcery.com>
117 James Norris <jnorris@codesourcery.com>
118 Joseph Myers <joseph@codesourcery.com>
119 Julian Brown <julian@codesourcery.com>
120 Bernd Schmidt <bschmidt@redhat.com>
121
122 * c-parser.c (c_parser_oacc_shape_clause): New.
123 (c_parser_oacc_simple_clause): New.
124 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
125 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
126
88bae6f4
TS
1272015-10-27 Thomas Schwinge <thomas@codesourcery.com>
128 James Norris <jnorris@codesourcery.com>
129 Cesar Philippidis <cesar@codesourcery.com>
130
131 PR c/64765
132 PR c/64880
133 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
134 parameters, and handle these. Adjust all users.
135 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
136 into...
137 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
138 all users.
139 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
140 declare functions.
141 (c_finish_omp_construct): Declare function.
142 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
143 Merge functions into...
144 (c_finish_omp_construct): ... this new function.
145
a8fc2579
RB
1462015-10-22 Richard Biener <rguenther@suse.de>
147
148 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
149 before folding a MINUS_EXPR.
150
e9122ef6
MP
1512015-10-21 Marek Polacek <polacek@redhat.com>
152
153 PR c/68024
154 * c-decl.c (start_function): Warn about vararg functions without
155 a prototype.
156
9f47c7e5
IE
1572015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
158
159 * c-typeck.c (build_conditional_expr): Use boolean vector
160 type for vector comparison.
161 (build_vec_cmp): New.
162 (build_binary_op): Use build_vec_cmp for comparison.
163
fa60eeb9
MP
1642015-10-20 Marek Polacek <polacek@redhat.com>
165
166 * c-parser.c (is_cilkplus_vector_p): Don't define here.
167
2c7020eb
MP
1682015-10-20 Marek Polacek <polacek@redhat.com>
169
170 PR c/67964
171 * c-parser.c (c_parser_attributes): Break out of the loop if the
172 token after an attribute isn't a comma.
173
d9a6bd32
JJ
1742015-10-13 Jakub Jelinek <jakub@redhat.com>
175 Aldy Hernandez <aldyh@redhat.com>
176
177 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
178 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
179 (c_parser_omp_variable_list): Handle structure elements for
180 map, to and from clauses. Handle array sections in reduction
181 clause. Formatting fixes.
182 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
183 if clause modifiers.
184 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
185 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
186 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
187 c_parser_omp_clause_is_device_ptr): New functions.
188 (c_parser_omp_clause_ordered): Parse optional parameter.
189 (c_parser_omp_clause_reduction): Handle array reductions.
190 (c_parser_omp_clause_schedule): Parse optional simd modifier.
191 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
192 functions.
193 (c_parser_omp_clause_linear): Parse linear clause modifiers.
194 (c_parser_omp_clause_depend_sink): New function.
195 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
196 (c_parser_omp_clause_map): Parse release/delete map kinds and
197 optional always modifier.
198 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
199 and c_finish_omp_clauses callers.
200 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
201 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
202 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
203 (OMP_CRITICAL_CLAUSE_MASK): Define.
204 (c_parser_omp_critical): Parse critical clauses.
205 (c_parser_omp_for_loop): Handle doacross loops, adjust
206 c_finish_omp_for and c_finish_omp_clauses callers.
207 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
208 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
209 (OMP_FOR_CLAUSE_MASK): Add linear clause.
210 (c_parser_omp_for): Disallow ordered clause when combined with
211 distribute. Disallow linear clause when combined with distribute
212 and not combined with simd.
213 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
214 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
215 parse clauses and if depend clause is found, don't parse a body.
216 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
217 Allow target parallel without for after it.
218 (OMP_TASK_CLAUSE_MASK): Add priority clause.
219 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
220 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
221 invalid kinds.
222 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
223 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
224 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
225 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
226 functions.
227 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
228 defaultmap and is_device_ptr clauses.
229 (c_parser_omp_target): Parse target parallel and target simd. Set
230 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
231 and target exit data. Diagnose invalid map kinds.
232 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
233 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
234 construct.
235 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
236 &omp_priv.
237 (OMP_TASKLOOP_CLAUSE_MASK): Define.
238 (c_parser_omp_taskloop): New function.
239 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
240 handle PRAGMA_OMP_TASKLOOP.
241 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
242 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
243 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
244 Add IS_OMP argument, handle structure element bases, diagnose
245 bitfields, pass IS_OMP recursively, diagnose known zero length
246 array sections in depend clauses, handle array sections in reduction
247 clause, diagnose negative length even for pointers.
248 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
249 types, pass IS_OMP down to handle_omp_array_sections_1, handle
250 array sections in reduction clause, set
251 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
252 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
253 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
254 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
255
21ba0cea
MP
2562015-10-06 Marek Polacek <polacek@redhat.com>
257
258 * c-parser.c (c_parser_statement_after_labels): Use
259 protected_set_expr_location.
260 (c_parser_omp_clause_num_gangs): Likewise.
261 (c_parser_omp_clause_num_threads): Likewise.
262 (c_parser_omp_clause_num_workers): Likewise.
263 (c_parser_omp_clause_vector_length): Likewise.
264 (c_parser_omp_clause_num_teams): Likewise.
265 (c_parser_omp_clause_thread_limit): Likewise.
266 * c-typeck.c (build_c_cast): Likewise.
267 (c_cast_expr): Likewise.
268
624d31fe
RS
2692015-10-05 Richard Sandiford <richard.sandiford@arm.com>
270
271 * c-typeck.c (c_tree_equal): Use real_equal instead of
272 REAL_VALUES_EQUAL.
273
b8fd7909
JM
2742015-10-04 Jason Merrill <jason@redhat.com>
275
276 * c-parser.c (c_lex_one_token): Handle @synchronized.
277 * c-decl.c (match_builtin_function_types): A declaration of a built-in
278 can change whether the function is transaction_safe.
279
1c7485af
MP
2802015-10-02 Marek Polacek <polacek@redhat.com>
281
282 PR c/67730
283 * c-typeck.c (convert_for_assignment): Use the expansion point
284 location throughout.
285
3e3b8d63
MP
2862015-10-02 Marek Polacek <polacek@redhat.com>
287
288 PR c/64249
289 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
290 and pass it down to c_parser_if_statement.
291 (c_parser_else_body): Add CHAIN parameter and pass it down to
292 c_parser_statement_after_labels.
293 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
294 duplicated if-else-if conditions.
295
aabef2de
MP
2962015-10-01 Marek Polacek <polacek@redhat.com>
297
298 * c-typeck.c (convert_for_assignment): Improve commentary.
299
de8ddd5f
MP
3002015-09-30 Marek Polacek <polacek@redhat.com>
301
302 PR c/67730
303 * c-typeck.c (c_finish_return): Use the expansion point location for
304 certain "return with value" warnings.
305
c4914de6
MLI
3062015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
307
308 * c-parser.c (pragma_lex): Add loc argument.
309
0e36f5c7
MP
3102015-09-15 Marek Polacek <polacek@redhat.com>
311
312 PR c/67580
313 * c-decl.c (tag_exists_p): New function.
314 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
315 struct/union/enum keywords are missing.
316 * c-tree.h (tag_exists_p): Declare.
317
2f3bb934
MP
3182015-09-15 Marek Polacek <polacek@redhat.com>
319
320 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
321 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
322 Return NULL_TREE instead of 0.
323 (lookup_name): Return NULL_TREE instead of 0.
324 (lookup_name_in_scope): Likewise.
325 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
326 (parser_xref_tag): Use false instead of 0.
327 (start_struct): Use true instead of 1.
328 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
329
aa256c4a
MP
3302015-09-14 Marek Polacek <polacek@redhat.com>
331
332 * c-typeck.c (set_nonincremental_init_from_string): Use
333 HOST_WIDE_INT_M1U when shifting a negative value.
334
dbb68221
MW
3352015-09-09 Mark Wielaard <mjw@redhat.com>
336
337 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
338 parm against NULL.
339
a8a098ac
JJ
3402015-09-10 Jakub Jelinek <jakub@redhat.com>
341
342 PR c/67502
343 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
344 into OMP_FOR_PRE_BODY rather than before the loop.
345
f4b189d5
JJ
3462015-09-09 Jakub Jelinek <jakub@redhat.com>
347
0bb99c11
JJ
348 PR c/67501
349 * c-parser.c (c_parser_oacc_all_clauses,
350 c_parser_omp_all_clauses): Remove invalid clause from
351 list of clauses even if parser->error is set.
352
fce5e5e3
JJ
353 PR c/67500
354 * c-parser.c (c_parser_omp_clause_aligned,
355 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
356 test for errors.
357 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
358 error_mark_node.
359
f4b189d5
JJ
360 PR c/67495
361 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
362 instead of c_parser_unary_expression. If the result is !lvalue_p,
363 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
364
b2aaf235
MP
3652015-09-04 Marek Polacek <polacek@redhat.com>
366
367 PR sanitizer/67279
368 * c-typeck.c (build_binary_op): Don't instrument static initializers.
369
1807ffc1
MS
3702015-09-03 Martin Sebor <msebor@redhat.com>
371
372 PR c/66516
8b652e65
JJ
373 * c-typeck.c (convert_arguments, parser_build_unary_op,
374 build_conditional_expr, c_cast_expr, convert_for_assignment,
375 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
376 reject_gcc_builtin.
377 (c_decl_implicit): Define.
378
d04ff417
MP
3792015-09-02 Marek Polacek <polacek@redhat.com>
380
381 PR c/67432
382 * c-parser.c (c_parser_enum_specifier): Give a better error for
383 an empty enum.
384
a79683d5
TS
3852015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
386
387 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
388
191a6b94
MP
3892015-08-12 Marek Polacek <polacek@redhat.com>
390
391 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
392 LOC to it.
393
420a9d9b
MP
3942015-08-03 Marek Polacek <polacek@redhat.com>
395
396 PR c/67088
397 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
398 Use it.
399 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
400
992118a1
PP
4012015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
402
403 * c-parser.c (c_parser_if_body): Take token_indent_info
404 argument. Call warn_for_misleading_indentation even when the
405 body is a semicolon. Extract token_indent_infos corresponding
406 to the guard, body and next tokens. Adjust call to
407 warn_for_misleading_indentation accordingly.
408 (c_parser_else_body): Likewise.
409 (c_parser_if_statement): Likewise.
410 (c_parser_while_statement): Likewise.
411 (c_parser_for_statement): Likewise.
412
46308474
LFSM
4132015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
414 Manuel López-Ibáñez <manu@gcc.gnu.org>
415
416 * c-decl.c (get_parm_info): Remove static var. Update warning
417 message.
418
05b28fd6
MP
4192015-07-27 Marek Polacek <polacek@redhat.com>
420
421 PR c++/66555
422 PR c/54979
423 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
424
451b5e48
MP
4252015-07-20 Marek Polacek <polacek@redhat.com>
426
427 PR c++/55095
428 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
429 (build_binary_op): Warn about left shift overflows.
430
1916bcb5
AM
4312015-07-09 Andrew MacLeod <amacleod@redhat.com>
432
433 * c-array-notation.c: Adjust includes for flags.h changes.
434 * c-objc-common.c: Likewise.
435
c7131fb2
AM
4362015-07-07 Andrew MacLeod <amacleod@redhat.com>
437
438 * c-array-notation.c: Adjust includes.
439 * c-aux-info.c: Likewise.
440 * c-convert.c: Likewise.
441 * c-decl.c: Likewise.
442 * c-errors.c: Likewise.
443 * c-lang.c: Likewise.
444 * c-objc-common.c: Likewise.
445 * c-parser.c: Likewise.
446 * c-typeck.c: Likewise.
447
da2e71c9
MLI
4482015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
449
450 PR fortran/66605
451 * c-decl.c (finish_function): Call do_warn_unused_parameter.
452
b155cfd9
MP
4532015-06-29 Marek Polacek <polacek@redhat.com>
454
455 PR c/66322
456 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
457 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
458 about -Wswitch-bool here.
459 (do_case): Update c_add_case_label call.
460 (c_finish_case): Update c_do_switch_warnings call.
461
31521951
MP
4622015-06-27 Marek Polacek <polacek@redhat.com>
463
464 * c-typeck.c: Use VECTOR_TYPE_P throughout.
465
22d03525
MP
4662015-06-26 Marek Polacek <polacek@redhat.com>
467
468 * c-array-notation.c (fix_builtin_array_notation_fn): Use
469 INDIRECT_REF_P.
470 * c-typeck.c (array_to_pointer_conversion): Likewise.
471 (build_unary_op): Likewise.
472 (c_finish_return): Likewise.
473
f0889939
AM
4742015-06-25 Andrew MacLeod <amacleod@redhat.com>
475
476 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
477 * c-parser.c: Likewise.
478
8d67ee55
RS
4792015-06-25 Richard Sandiford <richard.sandiford@arm.com>
480
481 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
482 instead of pointer_hash.
483 (detect_field_duplicates): Likewise.
484
0ae9bd27
MP
4852015-06-25 Marek Polacek <polacek@redhat.com>
486
487 * c-array-notation.c: Use VAR_P throughout.
488 * c-decl.c: Likewise.
489 * c-objc-common.c: Likewise.
490 * c-parser.c: Likewise.
491 * c-typeck.c: Likewise.
492
62f9079a
MP
4932015-06-25 Marek Polacek <polacek@redhat.com>
494
495 * c-decl.c: Use is_global_var throughout.
496 * c-parser.c: Likewise.
497 * c-typeck.c: Likewise.
498
abb226c9
AM
4992015-06-17 Andrew MacLeod <amacleod@redhat.com>
500
501 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
502 * c-aux-info.c: Likewise.
503 * c-convert.c: Likewise.
504 * c-decl.c: Likewise.
505 * c-errors.c: Likewise.
506 * c-lang.c: Likewise.
507 * c-objc-common.c: Likewise.
508 * c-parser.c: Likewise.
509 * c-typeck.c: Likewise.
510
8cbababc
JH
5112015-06-11 Jan Hubicka <hubicka@ucw.cz>
512
513 PR middle-end/66325
514 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
515 variants.
516
a0349665
PMR
5172015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
518
519 * c-decl.c (pop_scope): Register the main translation unit
520 through the new debug hook.
521
13fdf2e2
AM
5222015-06-08 Andrew MacLeod <amacleod@redhat.com>
523
524 * c-array-notation.c : Adjust include files.
525 * c-aux-info.c : Likewise.
526 * c-convert.c : Likewise.
527 * c-decl.c : Likewise.
528 * c-errors.c : Likewise.
529 * c-lang.c : Likewise.
530 * c-lang.h : Likewise.
531 * c-objc-common.c : Likewise.
532 * c-parser.c : Likewise.
533 * c-typeck.c : Likewise.
534
d7438551
AH
5352015-06-05 Aldy Hernandez <aldyh@redhat.com>
536
537 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
538 immediately clobber it.
539 (c_write_global_declarations_1): Remove call to
540 check_global_declaration_1.
541 (c_write_global_declarations_2): Remove.
542 (c_write_final_cleanups): Rename from c_write_global_declarations.
543 Remove call to finalize_compilation_unit.
544 Remove calls to debugging hooks.
545 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
546 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
547 * c-tree.h: Remove c_write_global_declarations.
548
ecb9f223
AM
5492015-06-04 Andrew MacLeod <amacleod@redhat.com>
550
551 * c-array-notation.c: Adjust includes for restructured coretypes.h.
552 * c-aux-info.c: Likewise.
553 * c-convert.c: Likewise.
554 * c-decl.c: Likewise.
555 * c-errors.c: Likewise.
556 * c-lang.c: Likewise.
557 * c-objc-common.c: Likewise.
558 * c-parser.c: Likewise.
559 * c-typeck.c: Likewise.
560
9482b620
MP
5612015-06-04 Marek Polacek <polacek@redhat.com>
562
563 PR c/66341
564 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
565 it is a lvalue.
566
bc51ace3
PK
5672015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
568
569 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
570 Warn for empty struct.
571 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
572
ea5b45b6
AT
5732015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
574
575 * c-decl.c (start_function): Call plugin before parsing.
576 (finish_function): Call plugin after parsing.
577
c2d47482
PK
5782015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
579
580 PR c/49551
581 * c-decl.c (merge_decls): Merge DECL_COMMON.
582
a95492ab
JW
5832015-05-22 Jim Wilson <jim.wilson@linaro.org>
584
585 * Make-lang.in (check_gcc_pallelize): Define.
586
fd5c817a
MP
5872015-05-22 Marek Polacek <polacek@redhat.com>
588
589 PR c/47043
590 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
591 attributes.
592
c7b70a3c
MP
5932015-05-21 Marek Polacek <polacek@redhat.com>
594
595 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
596 DECL_BUILT_IN.
597
21b634ae
MP
5982015-05-20 Marek Polacek <polacek@redhat.com>
599
600 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
601 * c-typeck.c: Likewise.
602
296a8c2f
MP
6032015-05-19 Marek Polacek <polacek@redhat.com>
604
605 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
606
41b37d5e
JJ
6072015-05-19 Jakub Jelinek <jakub@redhat.com>
608
609 PR middle-end/66199
610 * c-parser.c (c_parser_omp_for_loop): Don't add
611 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
612 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
613 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
614 constructs.
615
fab27f52
MM
6162015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
617
618 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 619 swaps.
fab27f52 620
40de31cf
MLI
6212015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
622
623 PR fortran/44054
624 * c-objc-common.c (c_tree_printer): Replace locus pointer with
625 accessor function.
626
3aa3c9fc
MP
6272015-05-14 Marek Polacek <polacek@redhat.com>
628
629 PR c/66066
630 PR c/66127
631 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
632 rather than with 0.
633
c3388e62
DM
6342015-05-12 David Malcolm <dmalcolm@redhat.com>
635
636 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
637 to add a call to warn_for_misleading_indentation.
638 (c_parser_else_body): Likewise, adding param "else_loc".
639 (c_parser_if_statement): Check for misleading indentation.
640 (c_parser_while_statement): Likewise.
641 (c_parser_for_statement): Likewise.
642
755e528f
MP
6432015-05-08 Marek Polacek <polacek@redhat.com>
644
645 PR c/64918
646 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
647 (output_init_element): Likewise.
648
0173bd2a
MP
6492015-05-07 Marek Polacek <polacek@redhat.com>
650
651 PR c/65179
652 * c-typeck.c (build_binary_op): Warn when left shifting a negative
653 value.
654
9babc352
MP
6552015-04-30 Marek Polacek <polacek@redhat.com>
656
657 * c-typeck.c (set_init_label): Call error_at instead of error and
658 pass LOC to it.
659
ac9f18db
MP
660 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
661 the type of a decl.
662
ec3fba51
MP
663 * c-typeck.c (c_build_va_arg): Clarify the error message.
664
b811915d
TS
6652015-04-29 Thomas Schwinge <thomas@codesourcery.com>
666
667 * c-parser.c (c_parser_oacc_enter_exit_data): Use
668 OMP_STANDALONE_CLAUSES.
669
f3075008
MP
6702015-04-28 Marek Polacek <polacek@redhat.com>
671
672 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
673
4e81b788
MP
6742015-04-28 Marek Polacek <polacek@redhat.com>
675
676 PR c/65901
677 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
678
6c1db78e
MP
6792015-04-25 Marek Polacek <polacek@redhat.com>
680
681 PR c/52085
682 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
683 attribute.
684
5c4abbb8
MP
6852015-04-23 Marek Polacek <polacek@redhat.com>
686
687 PR c/65345
688 * c-decl.c (set_labels_context_r): New function.
689 (store_parm_decls): Call it via walk_tree_without_duplicates.
690 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
691 instead of create_tmp_var. Build TARGET_EXPR instead of
692 COMPOUND_EXPR.
693 (build_atomic_assign): Use create_tmp_var_raw instead of
694 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
695
06aca1d5
IV
6962015-04-20 Ilya Verbin <ilya.verbin@intel.com>
697
698 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
699 (c_parser_omp_target_update): Add missed %> to error_at ().
700
8fba1830
BRF
7012015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
702
703 PR target/55143
704 * c-decl.c (c_default_pointer_mode): Remove definition.
705 * c-tree.h (c_default_pointer_mode): Remove declaration.
706
62021f64
TB
7072015-03-27 Tobias Burnus <burnus@net-b.de>
708
709 PR c/65586
710 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
711 error out.
712 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
713 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
714 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
715
9b65e171
JJ
7162015-03-19 Jakub Jelinek <jakub@redhat.com>
717
718 * c-decl.c (c_decl_attributes): Also add "omp declare target"
719 attribute for DECL_EXTERNAL VAR_DECLs.
720
17958621
JJ
7212015-03-11 Jakub Jelinek <jakub@redhat.com>
722
723 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
724 argument.
725
7ccb1a11
JJ
7262015-03-10 Jakub Jelinek <jakub@redhat.com>
727
728 PR c/65120
729 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
730 before preparing arguments to warn_logical_not_parentheses.
731
01177669
JJ
7322015-03-09 Jakub Jelinek <jakub@redhat.com>
733
734 PR c/65120
735 * c-typeck.c (parser_build_binary_op): Don't warn for
736 !!x == y or !b == y where b is _Bool.
737
802ac282
MP
7382015-03-09 Marek Polacek <polacek@redhat.com>
739
740 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
741 * c-decl.c (grokdeclarator): Likewise.
742 * c-typeck.c (build_binary_op): Likewise.
743
e5165b60
MP
7442015-02-27 Marek Polacek <polacek@redhat.com>
745
746 PR c/65228
747 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
748
065d214c
MP
7492015-02-14 Marek Polacek <polacek@redhat.com>
750
751 PR c/64768
752 * c-decl.c (grokdeclarator): Set the range of a flexible array member
753 declared through a typedef name.
754
e5d9235b
MP
7552015-02-13 Marek Polacek <polacek@redhat.com>
756
757 PR c/65050
758 * c-decl.c (grokdeclarator): Print also the type when giving
759 the error message about array's incomplete element type.
760
fa01ffcc
JJ
7612015-02-11 Jakub Jelinek <jakub@redhat.com>
762
763 PR c/64824
764 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
765 check in the POP macro.
766
c3e38a03
MP
7672015-02-09 Marek Polacek <polacek@redhat.com>
768
769 PR c/64856
770 * c-typeck.c (process_init_element): Don't always wrap
771 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
772 initializing a range of elements.
773
4886ec8e
JJ
7742015-02-04 Jakub Jelinek <jakub@redhat.com>
775
776 PR c/64824
777 PR c/64868
778 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
779
c3e38a03 7802015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
781
782 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
783 processing enum declaration.
784
7b33f0c8
MP
7852015-01-29 Marek Polacek <polacek@redhat.com>
786
787 PR c/64709
788 * c-typeck.c (pop_init_level): If constructor_elements has
789 exactly one element with integer_zerop value, set constructor_zeroinit
790 to 1. Remove braces around warning_init call.
791
dea63e49
JJ
7922015-01-27 Jakub Jelinek <jakub@redhat.com>
793
794 PR c/64766
795 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
796 of FUNCTION_DECLs with error_mark_node.
797
d38f7dce
JJ
7982015-01-26 Jakub Jelinek <jakub@redhat.com>
799
800 PR c/64778
801 * c-typeck.c (convert_arguments): Return -1 if there are
802 error_args, even if we've diagnosed too many arguments.
803
cbf5d0e7
RB
8042015-01-21 Richard Biener <rguenther@suse.de>
805
806 PR middle-end/64313
807 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
808 for builtins the user declared correctly.
809
41dbbb37
TS
8102015-01-15 Thomas Schwinge <thomas@codesourcery.com>
811 Bernd Schmidt <bernds@codesourcery.com>
812 Cesar Philippidis <cesar@codesourcery.com>
813 James Norris <jnorris@codesourcery.com>
814 Jakub Jelinek <jakub@redhat.com>
815 Ilmir Usmanov <i.usmanov@samsung.com>
816
817 * c-parser.c: Include "gomp-constants.h".
818 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
819 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
820 Use OMP_CLAUSE_SET_MAP_KIND.
821 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
822 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
823 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
824 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
825 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
826 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
827 "copyout", "create", "delete", "deviceptr", "gang", "host",
828 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
829 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
830 "present_or_create", "pcreate", "seq", "self", "vector",
831 "vector_length", "wait", "worker".
832 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
833 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
834 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
835 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
836 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
837 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
838 (c_parser_oacc_data_clause_deviceptr)
839 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
840 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
841 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
842 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
843 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
844 (c_parser_oacc_parallel, c_parser_oacc_update)
845 (c_parser_oacc_wait): New functions.
846 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
847 (c_finish_oacc_data): New prototypes.
848 * c-typeck.c: Include "gomp-constants.h".
849 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
850 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
851 OMP_CLAUSE_SET_MAP_KIND.
852 (c_finish_oacc_parallel, c_finish_oacc_kernels)
853 (c_finish_oacc_data): New functions.
854 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
855 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
856 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
857 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
858 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
859 GOMP_MAP_FORCE_DEVICEPTR.
860
adfac8df
JJ
8612015-01-09 Michael Collison <michael.collison@linaro.org>
862
863 * c-array-notation.c: Include hash-set.h, machmode.h,
864 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
865 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
866 * c-aux-info.c: Ditto.
867 * c-convert.c: Ditto.
868 * c-decl.c: Ditto.
869 * c-errors.c: Ditto.
870 * c-lang.c: Dittoxs.
871 * c-objc-common.c: Ditto.
872 * c-parser.c: Ditto.
873 * c-typeck.c: Include hash-set.h, machmode.h,
874 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
875 fold-const.h, wide-int.h, inchash.h, real.h and
876 fixed-value.h due to flattening of tree.h.
877
2cc901dc
MP
8782015-01-07 Marek Polacek <polacek@redhat.com>
879
880 PR c/64417
881 * c-typeck.c (process_init_element): Disallow initialization of
882 a flexible array member with a string constant if the structure
883 is in an array.
884
5624e564
JJ
8852015-01-05 Jakub Jelinek <jakub@redhat.com>
886
e5341100
JJ
887 PR sanitizer/64344
888 * c-typeck.c (convert_for_assignment, c_finish_return): For
889 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
890 types also set in_late_binary_op around convert call.
891 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
892 to integral type casts, if not in_late_binary_op, pass c_fully_fold
893 result on expr as last argument to ubsan_instrument_float_cast,
894 if in_late_binary_op, don't use c_save_expr but save_expr.
895
5624e564
JJ
896 Update copyright years.
897
5bd012f8
MP
8982015-01-05 Marek Polacek <polacek@redhat.com>
899
900 PR c/64423
901 * c-typeck.c (build_array_ref): Pass loc down to
902 warn_array_subscript_with_type_char.
903
768952be
MU
9042014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
905
906 * c-typeck.c: New behavious for pointers to arrays with qualifiers
907 (common-pointer-type): For pointers to arrays take qualifiers from
908 element type.
909 (build_conditional_expr): Add warnings for lost qualifiers.
910 (comp-target-types): Allow pointers to arrays with different qualifiers.
911 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
912 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
913 to PEDWARN_FOR_QUALIFIERS.
914
8f94a8c4
JJ
9152014-12-17 Jakub Jelinek <jakub@redhat.com>
916
917 PR sanitizer/64289
918 * c-convert.c: Include ubsan.h.
919 (convert): For real -> integral casts and
920 -fsanitize=float-cast-overflow don't call convert_to_integer, but
921 instead instrument the float cast directly.
922
b731b390
JJ
9232014-11-29 Jakub Jelinek <jakub@redhat.com>
924
925 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
926 c_finish_stmt_expr): Remove NULL last argument from
927 create_tmp_var_raw and create_tmp_var calls.
928 * c-array-notation.c (fix_builtin_array_notation_fn,
929 build_array_notation_expr, fix_conditional_array_notations_1,
930 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
931
541e35a6
MP
9322014-11-28 Marek Polacek <polacek@redhat.com>
933
934 PR c/63862
935 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
936 convert the right operand to integer type.
937
b286be94
MP
9382014-11-25 Marek Polacek <polacek@redhat.com>
939
940 PR c/63877
941 * c-decl.c (start_function): Disable -Wmissing-declarations warning
942 for inline functions.
943
aa7da51a
JJ
9442014-11-21 Jakub Jelinek <jakub@redhat.com>
945
946 PR target/63764
947 * c-typeck.c (build_array_ref): Adjust
948 convert_vector_to_pointer_for_subscript caller. If it returns true,
949 call non_lvalue_loc on the result.
950
d876207f
RB
9512014-11-11 Richard Biener <rguenther@suse.de>
952
953 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
954 to true.
955
e5e44252
AK
9562014-11-10 Andi Kleen <ak@linux.intel.com>
957
958 PR c/60804
959 * c-parser.c (c_parser_statement_after_labels): Call
960 check_no_cilk.
961 (c_parser_if_statement): Dito.
962 (c_parser_switch_statement): Dito.
963 (c_parser_while_statement): Dito.
964 (c_parser_do_statement): Dito.
965 (c_parser_for_statement): Dito.
966 * c-typeck.c (c_finish_loop): Dito.
967
13c21655
PC
9682014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
969
970 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
971 OPT_Wshift_count_overflow in the warnings.
972
2d51fcef
MP
9732014-10-30 Marek Polacek <polacek@redhat.com>
974
975 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
976 print the stripped version as well, if they're not the same.
977
ef4bddc2
RS
9782014-10-29 Richard Sandiford <richard.sandiford@arm.com>
979
980 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
981 machine_mode.
982
c582198b
AM
9832014-10-28 Andrew MacLeod <amacleod@redhat.com>
984
985 * c-decl.c: Adjust include files.
986 * c-parser.c: Ditto.
987
ddc8de03
PM
9882014-10-27 Phil Muldoon <pmuldoon@redhat.com>
989 Tom Tromey <tromey@redhat.com>
990
991 * c-tree.h (enum c_oracle_request): New.
992 (c_binding_oracle_function): New typedef.
993 (c_binding_oracle, c_pushtag, c_bind): Declare.
994 * c-decl.c (c_binding_oracle): New global.
995 (I_SYMBOL_CHECKED): New macro.
996 (i_symbol_binding): New function.
997 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
998 (I_TAG_CHECKED): New macro.
999 (i_tag_binding): New function.
1000 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1001 (I_LABEL_CHECKED): New macro.
1002 (i_label_binding): New function.
1003 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1004 (c_print_identifier): Save and restore c_binding_oracle.
1005 (c_pushtag, c_bind): New functions.
1006
60393bbc
AM
10072014-10-27 Andrew MacLeod <amacleod@redhat.com>
1008
1009 * c-typeck.c: Adjust include files.
1010
d723bb7c
MLI
10112014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1012
1013 PR c++/53061
1014 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1015 initialization here...
1016 (c_initialize_diagnostics): ... but here. Set defaults after
1017 building pretty-printer.
1018
1bc5a451
MP
10192014-10-23 Marek Polacek <polacek@redhat.com>
1020
1021 PR c/63626
1022 * c-decl.c (pop_scope): Don't print warning in external_scope.
1023
4435bb92
MP
10242014-10-19 Marek Polacek <polacek@redhat.com>
1025
1026 PR c/63567
1027 * c-typeck.c (output_init_element): Allow initializing objects with
1028 static storage duration with compound literals even in C99 and add
1029 pedwarn for it.
1030
7278465e
MP
10312014-10-17 Marek Polacek <polacek@redhat.com>
1032
1033 PR c/63567
1034 * c-typeck.c (digest_init): Allow initializing objects with static
1035 storage duration with compound literals even in C99 and add pedwarn
1036 for it.
1037
d9b7be2e
MP
10382014-10-17 Marek Polacek <polacek@redhat.com>
1039
1040 PR c/63543
1041 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1042 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1043 error multiple times. Print the type.
1044
f406ae1f
MP
10452014-10-17 Marek Polacek <polacek@redhat.com>
1046
1047 PR c/63549
1048 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1049 type.
1050
92574c7c
MP
10512014-10-17 Marek Polacek <polacek@redhat.com>
1052
1053 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1054 (start_function): Use OPT_Wimplicit_int instead of 0.
1055 (store_parm_decls_oldstyle): Likewise.
1056
1bc4a978
MT
10572014-10-17 Alan Modra <amodra@gmail.com>
1058
1059 PR middle-end/61848
1060 * c-decl.c (merge_decls): Don't merge section name or tls model
1061 to newdecl symtab node, instead merge to olddecl. Override
1062 existing olddecl section name. Set tls_model for all thread-local
1063 vars, not just OMP thread-private ones. Remove incorrect comment.
1064
83685514
AM
10652014-10-16 Andrew MacLeod <amacleod@redhat.com>
1066
1067 * c-decl.c: Adjust include files.
1068
78a7c317
DD
10692014-10-14 DJ Delorie <dj@redhat.com>
1070
1071 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1072 (c_token_starts_typename): Check all __intN, not just __int128.
1073 (c_token_starts_declspecs): Likewise.
1074 (c_parser_declspecs): Likewise.
1075 (c_parser_attribute_any_word): Likewise.
1076 (c_parser_objc_selector): Likewise.
1077 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1078 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1079 is specified.
1080 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1081 __int128.
1082 (finish_declspecs): Likewise.
1083
74d98c1e
AB
10842014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1085
1086 * c-parser.c (c_parser_all_labels): New function to replace
1087 the duplicate code.
1088 (c_parser_statement): Call the new function.
1089
84937de2
MP
10902014-10-09 Marek Polacek <polacek@redhat.com>
1091
1092 PR c/63480
1093 * c-typeck.c (pop_init_level): Don't warn about initializing
1094 with { }.
1095
0382aaa0
MP
10962014-10-07 Marek Polacek <polacek@redhat.com>
1097
1098 PR c/59717
1099 * c-decl.c (header_for_builtin_fn): New function.
1100 (implicitly_declare): Suggest which header to include.
1101
7a0ca710
MP
11022014-10-07 Marek Polacek <polacek@redhat.com>
1103
1104 * c-convert.c (convert): Use error_operand_p.
1105 * c-typeck.c (require_complete_type): Likewise.
1106 (really_atomic_lvalue): Likewise.
1107 (digest_init): Likewise.
1108 (handle_omp_array_sections_1): Likewise.
1109
6bc8a126
MP
11102014-10-03 Marek Polacek <polacek@redhat.com>
1111
1112 PR c/63453
1113 * c-decl.c (pop_scope): Don't warn about "inline function declared
1114 but never defined" for functions marked with gnu_inline attribute.
1115
d90c0a59
JJ
11162014-09-25 Jakub Jelinek <jakub@redhat.com>
1117
1118 PR c++/63249
1119 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1120 on low_bound and length.
1121
083e891e
MP
11222014-09-24 Marek Polacek <polacek@redhat.com>
1123
1124 PR c/61405
1125 PR c/53874
1126 * c-parser.c: Don't define CPP_KEYWORD.
1127 (c_parser_switch_statement): Pass original type to c_finish_case.
1128 * c-tree.h (c_finish_case): Update declaration.
1129 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1130 conditionally to c_do_switch_warnings.
1131
8d95fe25
MP
11322014-09-03 Marek Polacek <polacek@redhat.com>
1133
1134 PR c/62024
1135 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1136 conversions.
1137
9a771876
JJ
11382014-09-02 Jakub Jelinek <jakub@redhat.com>
1139 Balaji V. Iyer <balaji.v.iyer@intel.com>
1140 Igor Zamyatin <igor.zamyatin@intel.com>
1141
1142 * c-parser.c (c_parser_cilk_for): New function.
1143 (c_parser_cilk_grainsize): Likewise.
1144 (c_get_temp_regvar): Likewise.
1145 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1146 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1147 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1148 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1149 case.
1150
b7679d96
CG
11512014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1152
1153 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1154 with using HOST_WIDE_INT without truncation to 'int'
1155
59ea0364
MP
11562014-08-22 Marek Polacek <polacek@redhat.com>
1157
1158 PR c++/62199
1159 * c-typeck.c (parser_build_binary_op): Adjust call to
1160 warn_logical_not_parentheses.
1161
671a475e
IZ
11622014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1163
1164 PR other/62008
1165 * c-parser.c (c_parser_array_notation): Check for correct
1166 type of an array added.
1167
04159acf
MP
11682014-08-19 Marek Polacek <polacek@redhat.com>
1169
1170 PR c++/62153
1171 * c-typeck.c (build_binary_op): If either operand of a comparison
1172 is a boolean expression, call maybe_warn_bool_compare.
1173
c77935ee
PP
11742014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1175
1176 PR c/45584
1177 * c-typeck.c (build_c_cast): Do a conversion even when the
1178 TYPE_MAIN_VARIANTs are the same.
1179
35aff4fb
MP
11802014-08-19 Marek Polacek <polacek@redhat.com>
1181
1182 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1183 pedwarn_c99 instead of pedwarn.
1184 (grokfield): Likewise.
1185 (warn_defaults_to): New function.
1186 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1187 Unconditionally call pedwarn_c99 instead of pedwarn.
1188 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1189 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1190 check flag_isoc11 before.
1191 * c-errors.c (pedwarn_c99): Change the return type to bool.
1192 Handle -Wc99-c11-compat.
1193 * c-parser.c (disable_extension_diagnostics): Handle
1194 warn_c99_c11_compat.
1195 (restore_extension_diagnostics): Likewise.
1196 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1197 instead of pedwarn, don't check flag_isoc11 before.
1198 (c_parser_declspecs): Likewise.
1199 (c_parser_alignas_specifier): Likewise.
1200 (c_parser_alignof_expression): Likewise.
1201 (c_parser_generic_selection): Likewise.
1202 * c-tree.h (pedwarn_c99): Update declaration.
1203 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1204 of pedwarn_c99.
1205
177cce46
MP
12062014-08-19 Marek Polacek <polacek@redhat.com>
1207
1208 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1209 to pedwarn_c90.
1210 * c-errors.c: Include "opts.h".
1211 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1212 * c-parser.c (disable_extension_diagnostics): Handle negative value
1213 of warn_c90_c99_compat, too.
1214 (restore_extension_diagnostics): Likewise.
1215 (c_parser_compound_statement_nostart): Pass
1216 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1217
6dc99c33
MP
12182014-08-12 Marek Polacek <polacek@redhat.com>
1219
1220 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1221 Add pedwarn.
1222 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1223 Likewise.
1224 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1225
f3bede71
MP
12262014-08-10 Marek Polacek <polacek@redhat.com>
1227
1228 PR c/51849
1229 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1230 Call pedwarn_c90 instead of pedwarn.
1231 (check_bitfield_type_and_width): Likewise.
1232 (declspecs_add_qual): Likewise.
1233 (declspecs_add_type): Likewise.
1234 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1235 Adjust to only call pedwarn_c90.
1236 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
1237 pedwarn_c90 instead of pedwarn.
1238 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
1239 * c-parser.c (disable_extension_diagnostics): Handle
1240 warn_c90_c99_compat.
1241 (restore_extension_diagnostics): Likewise.
1242 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
1243 pedwarn_c90 instead of pedwarn.
1244 (c_parser_initelt): Likewise.
1245 (c_parser_postfix_expression): Likewise.
1246 (c_parser_postfix_expression_after_paren_type): Likewise.
1247 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
1248 * c-tree.h: Fix formatting.
1249 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
1250 pedwarn_c90 instead of pedwarn.
1251
9f25a338
TS
12522014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1253
1254 * c-typeck.c: Remove include of pointer-set.h.
1255
044331a8
MP
12562014-08-07 Marek Polacek <polacek@redhat.com>
1257
1258 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
1259
b787e7a2
TS
12602014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1261
1262 * c-typeck.c: Use hash_map instead of pointer_map.
1263
6e2830c3
TS
12642014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1265
1266 * c-decl.c: Use hash_set instead of pointer_set.
1267
a7ee52fb
IZ
12682014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1269
1270 PR middle-end/61455
1271 * c-array-notation.c (expand_array_notations): Handling
1272 of DECL_EXPR added.
1273
b4dfdc11
MG
12742014-07-31 Marc Glisse <marc.glisse@inria.fr>
1275
1276 PR c++/60517
1277 * c-typeck.c (c_finish_return): Return 0 instead of the address of
1278 a local variable.
1279
976d5a22
TT
12802014-07-30 Tom Tromey <tromey@redhat.com>
1281
1282 * c-typeck.c (struct constructor_stack) <designator_depth>: New
1283 field.
1284 (really_start_incremental_init, push_init_level): Initialize
1285 designator_depth.
1286 (pop_init_level): Set global designator_depth.
1287 (process_init_element): Check for designated_init attribute.
1288
30281de2
MP
12892014-07-20 Marek Polacek <polacek@redhat.com>
1290
1291 PR c/61852
1292 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
1293 (implicitly_declare): Pass location to implicit_decl_warning.
1294
b108f48f
JJ
12952014-07-14 Jakub Jelinek <jakub@redhat.com>
1296
1297 PR middle-end/61294
1298 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
1299 If non-NULL, call c_parser_check_literal_zero.
1300 (c_parser_check_literal_zero): New function.
1301 (c_parser_postfix_expression_after_primary): Adjust
1302 c_parser_expr_list caller, handle -Wmemset-transposed-args.
1303
773ec47f
MP
13042014-07-06 Marek Polacek <polacek@redhat.com>
1305
1306 PR c/6940
1307 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
1308 * c-tree.h (C_ARRAY_PARAMETER): Define.
1309 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
1310 function parameter.
1311
22e1cf1c
JH
13122014-07-02 Jan Hubicka <hubicka@ucw.cz>
1313 Chen Gang <gang.chen.5i5j@gmail.com>
1314
1315 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
1316 releasing symbol.
1317
52ec0ea3
MP
13182014-07-01 Marek Polacek <polacek@redhat.com>
1319
1320 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
1321 instead of 0 to WARN_FOR_ASSIGNMENT.
1322
d5c3d343
MP
13232014-07-01 Marek Polacek <polacek@redhat.com>
1324
1325 PR c/58286
1326 * c-typeck.c (convert_for_assignment): Pass
1327 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
1328
6a7253a4
MP
13292014-06-30 Marek Polacek <polacek@redhat.com>
1330
1331 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
1332 has no_sanitize_undefined attribute.
1333
5e88a8f4
IZ
13342014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1335
1336 PR middle-end/57541
1337 * c-array-notation.c (fix_builtin_array_notation_fn):
1338 Check for 0 arguments in builtin call. Check that bultin argument is
1339 correct.
1340 * c-parser.c (c_parser_array_notation): Check for incorrect initial
1341 index.
1342
9698b078
SH
13432014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
1344
1345 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
1346 qualifiers in __auto_type for atomic types.
1347 (c_parser_typeof_specifier): Discard all type qualifiers in
1348 __typeof__ for atomic types.
1349
6e07c515
MP
13502014-06-25 Marek Polacek <polacek@redhat.com>
1351
1352 PR c/61162
1353 * c-parser.c (c_parser_statement_after_labels): Pass the location of
1354 the return expression to c_finish_return.
1355
da6f124d
JJ
13562014-06-25 Jakub Jelinek <jakub@redhat.com>
1357
1358 * c-typeck.c (c_finish_omp_clauses): Make sure
1359 OMP_CLAUSE_LINEAR_STEP has correct type.
1360
c203e8a7
TS
13612014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1362
1363 * c-decl.c: Adjust.
1364
56ad0e38
JJ
13652014-06-24 Jakub Jelinek <jakub@redhat.com>
1366
1367 * c-parser.c (c_parser_omp_for_loop): For
1368 #pragma omp parallel for simd move lastprivate clause from parallel
1369 to for rather than simd.
1370
47c2554f
MP
13712014-06-23 Marek Polacek <polacek@redhat.com>
1372
1373 * c-typeck.c (parser_build_binary_op): Don't call
1374 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
1375
56363ffd
JH
13762014-06-15 Jan Hubicka <hubicka@ucw.cz>
1377
1378 * c-parser.c (c_parser_omp_threadprivate): Likewise.
1379 * c-decl.c (merge_decls): Likewise.
1380
d7ff7ae5
MP
13812014-06-09 Marek Polacek <polacek@redhat.com>
1382
1383 PR c/36446
1384 * c-typeck.c (error_init): Call inform instead of error_at.
1385 (pedwarn_init): Call inform instead of pedwarn.
1386 (warning_init): Call inform instead of warning_at.
1387
24d047a3
JH
13882014-06-07 Jan Hubicka <hubicka@ucw.cz>
1389
1390 * c-decl.c (merge_decls): Use set_decl_section_name.
1391 (duplicate_decls): Remove node if it exists.
1392
9bac5cbb
G
13932014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
1394
1395 PR c/53119
1396 * c-typeck.c (push_init_level, process_init_element,
1397 pop_init_level): Correct check for zero initialization, move
1398 missing brace warning to respect zero initialization.
1399
8ffcdea8
MP
14002014-06-05 Marek Polacek <polacek@redhat.com>
1401
1402 PR c/56724
1403 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1404
742938c9
MP
14052014-06-05 Marek Polacek <polacek@redhat.com>
1406
1407 PR c/49706
1408 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1409 on the left hand side operand of a comparison.
1410
6447c55d
MP
14112014-06-05 Marek Polacek <polacek@redhat.com>
1412
1413 PR c/48062
1414 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
1415 Print note only if the warning was printed.
1416
9dc7743c
IZ
14172014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1418
1419 PR c/58942
1420 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1421 with a pointer.
1422
fedfecef
MP
14232014-06-03 Marek Polacek <polacek@redhat.com>
1424
1425 PR c/60439
1426 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1427 c_start_case.
1428 * c-tree.h (c_start_case): Update.
1429 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
1430 switch condition has boolean value.
1431
9b2b7279
AM
14322014-06-02 Andrew MacLeod <amacleod@redhat.com>
1433
1434 * c-decl.c: Include builtins.h.
1435 * c-parser.c: Likewise.
1436
5c1bc275
MP
14372014-05-27 Marek Polacek <polacek@redhat.com>
1438
1439 PR c/56724
1440 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1441 error and warning calls to error_at and warning_at. Pass location of
1442 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1443 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1444 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1445
97563bc8
IZ
14462014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1447
1448 PR c/61191
1449 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1450 function parameters.
1451
aede2c10
JH
14522014-05-23 Jan Hubicka <hubicka@ucw.cz>
1453
1454 * c-decl.c (merge_decls): Preserve symtab node pointers.
1455 (duplicate_decls): Free new decl.
1456
edbba2ce
TS
14572014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1458
f3316c6d
TS
1459 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1460 initialization.
1461
edbba2ce
TS
1462 * c-parser.c (c_parser_omp_target): Return bool values.
1463
68c81f24
TS
14642014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1465
1466 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1467 num_teams_loc variable to num_thread_limit_loc.
1468
632f2871
RS
14692014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1470
1471 * c-array-notation.c (expand_array_notations): Use void_node
1472 instead of void_zero_node.
1473
766090c2
TS
14742014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1475
1476 * c-decl.c (finish_struct): Adjust.
1477 (finish_enum): Likewise.
1478 (bind): Adjust.
1479 (record_inline_static): Likewise.
1480 (push_scope): Likewise.
1481 (make_label): Likewise.
1482 (lookup_label_for_goto): Likewise.
1483 (finish_struct): Likewise.
1484 (finish_enum): Likewise.
1485 (store_parm_decls): Likewise.
1486 (c_push_function_context): Likewise.
1487 * c-lang.h: Remove usage of variable_size gty attribute.
1488 * c-parser.c (c_parse_init): Adjust.
1489 (c_parse_file): Likewise.
1490
2b107f6b
MP
14912014-05-13 Marek Polacek <polacek@redhat.com>
1492
1493 PR c/61162
1494 * c-typeck.c (convert_for_assignment): Pass location to
1495 WARN_FOR_ASSIGNMENT instead of input_location.
1496
d033409e
MP
14972014-05-10 Marek Polacek <polacek@redhat.com>
1498
1499 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1500 maybe_warn_string_init.
1501 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1502 maybe_warn_string_init.
1503 * c-tree.h (maybe_warn_string_init): Update declaration.
1504 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1505 Call pedwarn_init with loc instead of with input_location.
1506 (digest_init): Pass init_loc to maybe_warn_string_init.
1507 (pop_init_level): Call pedwarn_init with loc instead of with
1508 input_location.
1509 (set_init_index): Likewise.
1510 (process_init_element): Likewise.
1511
ea58ef42
MP
15122014-05-09 Marek Polacek <polacek@redhat.com>
1513
1514 PR c/61096
1515 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1516 (c_parser_initelt): Pass location to set_init_label. Pass array index
1517 location to set_init_index.
1518 * c-tree.h (push_init_level): Update declaration.
1519 (pop_init_level): Likewise.
1520 (set_init_index): Likewise.
1521 (set_init_label): Likewise.
1522 * c-typeck.c (error_init): Add location parameter. Call error_at
1523 instead of error.
1524 (digest_init): Pass init_loc to error_init.
1525 (really_start_incremental_init):
1526 (push_init_level): Add location parameter. Pass loc to pop_init_level
1527 and error_init.
1528 (pop_init_level): Likewise.
1529 (set_designator): Add location parameter. Pass loc to pop_init_level,
1530 push_init_level, and error_init.
1531 (set_init_index): Add location parameter. Pass loc to error_init and
1532 set_designator.
1533 (set_init_label): Likewise.
1534 (output_init_element): Pass loc to error_init.
1535 (process_init_element): Pass loc to error_init, pop_init_level,
1536 pedwarn_init, and push_init_level.
1537
661a0813
MP
15382014-05-09 Marek Polacek <polacek@redhat.com>
1539
1540 PR c/50459
1541 * c-parser.c (c_parser_attributes): Parse the arguments as an
1542 expression-list if the attribute takes identifier.
1543
2793eeab
MP
15442014-05-08 Marek Polacek <polacek@redhat.com>
1545
1546 PR c/61053
1547 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1548 TYPE_ALIGN_UNIT.
1549
f827930a
MP
15502014-05-08 Marek Polacek <polacek@redhat.com>
1551
1552 PR c/61077
1553 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1554 of main.
1555
1d60af08
KZ
15562014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1557 Mike Stump <mikestump@comcast.net>
1558 Richard Sandiford <rdsandiford@googlemail.com>
1559
1560 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1561 (finish_enum): Use wide-int interfaces.
1562 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1563 * c-typeck.c (build_c_cast): Likewise.
1564 (set_nonincremental_init_from_string): Likewise.
1565 (c_tree_equal): Likewise.
1566
a0e24419
MP
15672014-05-02 Marek Polacek <polacek@redhat.com>
1568
1569 PR c/25801
1570 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1571 Return size_one_node when the type is not complete.
1572 (pointer_diff): Remove comment.
1573 (build_unary_op): Improve error messages.
1574
19fc9faa
MP
15752014-05-02 Marek Polacek <polacek@redhat.com>
1576
1577 * c-typeck.c (c_finish_return): Separate warning_at calls.
1578
63bc4e87
MP
15792014-05-02 Marek Polacek <polacek@redhat.com>
1580
1581 * c-tree.h (error_init): Remove declaration.
1582 (pedwarn_init): Likewise.
1583 * c-typeck.c (error_init): Make static and move above.
1584 (pedwarn_init): Likewise.
1585 (warning_init): Move above.
1586 (maybe_warn_string_init): Likewise.
1587
4bd2511b
JL
15882014-05-01 Jeff Law <law@redhat.com>
1589
1590 Revert:
1591
1592 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1593 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1594 avoid goto.
1595
6a358dcb
MP
15962014-05-02 Marek Polacek <polacek@redhat.com>
1597
1598 PR c/60784
1599 * c-typeck.c (push_init_level): Set constructor_designated to
1600 p->designated for structures.
1601
ae5ebda4
MP
16022014-05-01 Marek Polacek <polacek@redhat.com>
1603
1604 PR c/60915
1605 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1606 function-definition has an attribute after the declarator.
1607
96b40f8d
MP
16082014-05-01 Marek Polacek <polacek@redhat.com>
1609
1610 PR c/60257
1611 * c-typeck.c (warning_init): Add location_t parameter. Call
1612 warning_at instead of warning.
1613 (push_init_level): Pass input_location to warning_init.
1614 (add_pending_init): Add location_t parameter. Pass loc to
1615 warning_init.
1616 (set_nonincremental_init): Pass input_location to add_pending_init.
1617 (set_nonincremental_init_from_string): Likewise.
1618 (output_init_element): Pass loc to warning_init and to
1619 add_pending_init.
1620
32e00768
MP
16212014-05-01 Marek Polacek <polacek@redhat.com>
1622
1623 PR c/43395
1624 * c-typeck.c (c_finish_return): Distinguish between label and variable
1625 when warning about returning local address.
1626
c9379ce2
MP
16272014-05-01 Marek Polacek <polacek@redhat.com>
1628
1629 PR c/29467
1630 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1631 in C89 mode.
1632
d00887e8
MP
16332014-05-01 Marek Polacek <polacek@redhat.com>
1634
1635 PR c/43245
1636 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1637 instead of 0 to WARN_FOR_QUALIFIERS.
1638
5436fa2e
MP
16392014-05-01 Marek Polacek <polacek@redhat.com>
1640
1641 PR c/56989
1642 * c-typeck.c (default_conversion): Use better location for
1643 error call.
1644
f8ed5150
MP
16452014-04-30 Marek Polacek <polacek@redhat.com>
1646
1647 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1648 also when SANITIZE_FLOAT_DIVIDE is on.
1649
8337d1db
MP
16502014-04-30 Marek Polacek <polacek@redhat.com>
1651
1652 PR c/60139
1653 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1654 and pedwarn_init. Use loc insted of input_location.
1655
c4bdc42f
MP
16562014-04-30 Marek Polacek <polacek@redhat.com>
1657
1658 PR c/60351
1659 * c-typeck.c (build_binary_op): Use location when warning about
1660 shift count.
1661
45484dcf
MP
16622014-04-25 Marek Polacek <polacek@redhat.com>
1663
1664 PR c/18079
1665 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1666 always_inline/noinline and hot/cold attributes.
1667
34cf811f
MP
16682014-04-25 Marek Polacek <polacek@redhat.com>
1669
1670 PR c/60114
1671 * c-parser.c (c_parser_initelt): Pass input_location to
1672 process_init_element.
1673 (c_parser_initval): Pass loc to process_init_element.
1674 * c-tree.h (process_init_element): Adjust declaration.
1675 * c-typeck.c (push_init_level): Pass input_location to
1676 process_init_element.
1677 (pop_init_level): Likewise.
1678 (set_designator): Likewise.
1679 (output_init_element): Add location_t parameter. Pass loc to
1680 digest_init.
1681 (output_pending_init_elements): Pass input_location to
1682 output_init_element.
1683 (process_init_element): Add location_t parameter. Pass loc to
1684 output_init_element.
1685
42056eac
JJ
16862014-04-24 Jakub Jelinek <jakub@redhat.com>
1687
1688 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1689 atomic-clause, allow comma in between atomic-clause and
1690 seq_cst.
1691
e162a134
JJ
16922014-04-22 Jakub Jelinek <jakub@redhat.com>
1693
1694 PR c/59073
1695 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1696 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1697
2f6babac
IZ
16982014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1699
1700 PR middle-end/60469
1701 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1702 create_tmp_var instead build_decl for creating temps.
1703 (build_array_notation_expr): Likewise.
1704 (fix_conditional_array_notations_1): Likewise.
1705 (fix_array_notation_expr): Likewise.
1706 (fix_array_notation_call_expr): Likewise.
1707
8edbfaa6
JJ
17082014-03-28 Jakub Jelinek <jakub@redhat.com>
1709
1710 PR c++/60689
1711 * c-tree.h (c_build_function_call_vec): New prototype.
1712 * c-typeck.c (build_function_call_vec): Don't call
1713 resolve_overloaded_builtin here.
1714 (c_build_function_call_vec): New wrapper function around
1715 build_function_call_vec. Call resolve_overloaded_builtin here.
1716 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1717 Call c_build_function_call_vec instead of build_function_call_vec.
1718 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1719 * c-decl.c (finish_decl): Likewise.
1720
7485aeea
MLI
17212014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1722
1723 PR c/55383
1724 * c-typeck.c: Use correct format string in cast-qual warning
1725
b17a8b07
TS
17262014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1727
1728 * c-decl.c (c_decl_attributes): Use
1729 lang_hooks.types.omp_mappable_type.
1730 * c-typeck.c (c_finish_omp_clauses): Likewise.
1731
3af9c5e9
MP
17322014-03-06 Marek Polacek <polacek@redhat.com>
1733
1734 PR c/60197
1735 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1736 of checking tree code.
1737
1c9f5f33
PK
17382014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1739
1740 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1741 (c_parser_parameter_declaration): Likewise.
1742
cc28fc7f
MP
17432014-02-19 Marek Polacek <polacek@redhat.com>
1744
1745 PR c/60195
1746 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1747 Call mark_exp_read on exp.value.
1748 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1749 TREE_ADDRESSABLE on old instead of val.
1750 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1751
b581c05c
PK
17522014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1753
1754 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1755 C_EXPR_APPEND by vec_safe_push.
1756 * c-tree.h (C_EXPR_APPEND): Remove.
1757
81e5eca8
MP
17582014-01-31 Marek Polacek <polacek@redhat.com>
1759
1760 PR c/59963
1761 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1762 build_function_call_vec.
1763 (build_function_call): Likewise.
1764 (build_atomic_assign): Likewise.
1765 (build_function_call_vec): Add arg_loc parameter. Use it.
1766 (convert_arguments): Likewise.
1767 (convert_for_assignment): Rename rhs_loc to expr_loc.
1768 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1769 (c_parser_objc_keywordexpr): Likewise.
1770 (c_parser_postfix_expression_after_primary): Call
1771 build_function_call_vec with expr_loc rather than op_loc.
1772 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1773 build_function_call_vec.
1774 (c_parser_expr_list): Add locations parameter. Fill it with locations
1775 of function arguments.
1776 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1777
68fca595
MP
17782014-01-30 Marek Polacek <polacek@redhat.com>
1779
1780 PR c/59940
1781 * c-typeck.c (build_function_call_vec): Use loc parameter.
1782 (convert_arguments): Add location parameter. Use it.
1783 (ep_convert_and_check): Likewise.
1784 (build_atomic_assign): Adjust convert_for_assignment call.
1785 (build_modify_expr): Likewise.
1786 (digest_init): Likewise.
1787 (c_finish_return): Likewise.
1788 (build_conditional_expr): Adjust ep_convert_and_check calls.
1789 (convert_for_assignment): Add rhs_loc parameter. Use it.
1790 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1791 calls.
1792
fa337f3a
RB
17932014-01-30 Richard Biener <rguenther@suse.de>
1794
1795 PR c/59905
1796 * c-typeck.c (build_function_call_vec): Do not replace calls
1797 to a function via an incompatible type with a runtime abort.
1798
b72271b9
BI
17992014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1800
1801 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1802 flag_enable_cilkplus with flag_cilkplus.
1803 (c_parser_direct_declarator_inner): Likewise.
1804 (c_parser_attribute_any_word): Likewise.
1805 (c_parser_attributes): Likewise.
1806 (c_parser_compound_statement): Likewise.
1807 (c_parser_statement_after_labels): Likewise.
1808 (c_parser_if_statement): Likewise.
1809 (c_parser_switch_statement): Likewise.
1810 (c_parser_do_statement): Likewise.
1811 (c_parser_for_statement): Likewise.
1812 (c_parser_unary_expression): Likewise.
1813 (c_parser_postfix_expression): Likewise.
1814 (c_parser_postfix_expression_after_primary): Likewise.
1815 (c_parser_postfix_expression_after_primary): Likewise.
1816 (c_parser_omp_clause_name): Likewise.
1817 (c_finish_omp_declare_simd): Likewise.
1818 (c_parser_cilk_verify_simd): Likewise.
1819 * c-typeck.c (build_array_ref): Likewise.
1820 (build_function_call_vec): Likewise.
1821 (convert_arguments): Likewise.
1822 (build_compound_expr): Likewise.
1823 (c_finish_return): Likewise.
1824 (c_finish_if_stmt): Likewise.
1825 (c_finish_loop): Likewise.
1826 (build_binary_op): Likewise.
1827
393e8e8b
MP
18282014-01-23 Marek Polacek <polacek@redhat.com>
1829
1830 PR c/59846
1831 * c-typeck.c (parser_build_binary_op): Use location instead of
1832 input_location.
1833 (build_binary_op): Pass location to shorten_compare.
1834
f04dda30
MP
18352014-01-23 Marek Polacek <polacek@redhat.com>
1836
1837 PR c/58346
1838 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1839 an empty aggregate.
1840
789eadcd
MP
18412014-01-23 Marek Polacek <polacek@redhat.com>
1842
1843 PR c/59871
1844 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1845 of a comma expression.
1846 (emit_side_effect_warnings): Likewise.
1847
40f14e9f
BI
18482014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1849
1850 PR c/59825
1851 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1852 function to use walk_tree and moved a lot of its functionality to
1853 expand_array_notations.
1854 (expand_array_notations): New function.
1855
74558dd9
BI
18562014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1857
1858 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1859 attribute an attribute without value.
1860
652fea39
JJ
18612014-01-23 Jakub Jelinek <jakub@redhat.com>
1862
1863 PR middle-end/58809
1864 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1865 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1866
f34f1c87
MP
18672014-01-22 Marek Polacek <polacek@redhat.com>
1868
1869 PR c/59891
1870 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1871 of remove_c_maybe_const_expr on op1 and op2.
1872
241f845a
JJ
18732014-01-15 Jakub Jelinek <jakub@redhat.com>
1874
1875 PR c/58943
1876 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1877 effects, preevaluate rhs using SAVE_EXPR first.
1878
9a74f20c
BI
18792014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1880
1881 PR c++/59631
1882 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1883 statements with if-elseif statements.
1884
96066ce1
MP
18852014-01-06 Marek Polacek <polacek@redhat.com>
1886
1887 PR c/57773
1888 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1889 defined bit-field types only in ISO C.
1890
23a5b65a
RS
18912014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1892
1893 Update copyright years
1894
f9030485
RS
18952014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1896
1897 * c-array-notation.c: Use the standard form for the copyright notice.
1898
41958c28
BI
18992013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1900
1901 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1902 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1903 field in parser is not empty. If not-empty, call the function
1904 c_parser_finish_omp_declare_simd.
1905 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1906 between SIMD-enabled functions and #pragma simd. Added new parameter.
1907 (c_parser_cilk_all_clauses): Modified the usage of the function
1908 c_parser_cilk_clause_vectorlength as mentioned above.
1909 (c_parser_cilk_simd_fn_vector_attrs): New function.
1910 (c_finish_cilk_simd_fn_tokens): Likewise.
1911 (is_cilkplus_vector_p): Likewise.
1912 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1913 "nomask," and "mask" strings in clause name.
1914 (c_parser_omp_all_clauses): Added 3 new case statements:
1915 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1916 PRAGMA_CILK_CLAUSE_NOMASK.
1917 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1918 check for vector attribute and if so call the function
1919 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1920 called the function c_finish_cilk_simd_fn_tokens.
1921 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1922 parser field is non-empty. If so, parse them as you would parse
1923 the omp declare simd pragma.
1924 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1925 Added a check when step is a parameter and flag it as error.
1926 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1927 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1928 pragma_omp_clause.
1929
cef0fd0e
TS
19302013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1931
1932 * c-parser.c (c_parser_omp_parallel): Fix description.
1933
12893402
BI
19342013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1935
1936 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1937 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1938 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1939 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1940
296674db
JM
19412013-12-04 Joseph Myers <joseph@codesourcery.com>
1942
1943 PR c/52023
1944 * c-parser.c (c_parser_alignas_specifier): Use
1945 c_sizeof_or_alignof_type instead of c_alignof.
1946 (c_parser_alignof_expression): Likewise, with min_alignof
1947 parameter depending on alignof spelling used.
1948
edd28054
MP
19492013-12-04 Marek Polacek <polacek@redhat.com>
1950
1951 PR c/54113
1952 * c-decl.c (start_function): Don't warn for missing prototype for
1953 inline functions.
1954
da0fc454
MP
19552013-12-03 Marek Polacek <polacek@redhat.com>
1956
1957 PR c/59351
1958 * c-decl.c (build_compound_literal): Allow compound literals with
1959 empty initial value.
1960
4c2ecab0
JM
19612013-12-02 Joseph Myers <joseph@codesourcery.com>
1962
1963 PR c/58235
1964 * c-typeck.c (build_modify_expr): Diagnose assignment to
1965 expression with array type.
1966
340baef7
JM
19672013-11-29 Joseph Myers <joseph@codesourcery.com>
1968
1969 PR c/42262
1970 * c-typeck.c (process_init_element): Do not treat a string as
1971 initializing a whole array when used with a designator for an
1972 individual element.
1973
6763b9f7
JM
19742013-11-29 Joseph Myers <joseph@codesourcery.com>
1975
1976 PR c/57574
1977 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1978 an inline function following a static declaration.
1979
e7bd1de1
JJ
19802013-11-28 Jakub Jelinek <jakub@redhat.com>
1981
1982 PR c/59310
1983 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1984 to p_name before calling c_parser_omp_teams instead of after.
1985 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1986 argument. Remove unused p_name variable.
1987
0136f8f0
AH
19882013-11-27 Aldy Hernandez <aldyh@redhat.com>
1989 Jakub Jelinek <jakub@redhat.com>
1990
1991 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1992 external_scope is NULL.
1993
241b71bb
TV
19942013-11-27 Tom de Vries <tom@codesourcery.com>
1995 Marc Glisse <marc.glisse@inria.fr>
1996
1997 PR c++/59032
1998 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1999
2fb9a547
AM
20002013-11-22 Andrew MacLeod <amacleod@redhat.com>
2001
2002 * c-typeck.c: Add required include files from gimple.h.
2003
8400e75e
DM
20042013-11-22 David Malcolm <dmalcolm@redhat.com>
2005
2006 * c-decl.c (define_label, shadow_tag_warned)
2007 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2008 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2009 (declspecs_add_type): Remove use of in_system_header macro.
2010 * c-parser.c (c_parser_unary_expression): Likewise.
2011 * c-typeck.c (store_init_value, process_init_element)
2012 (c_start_case): Likewise.
2013
2014 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2015 macro.
2016
2017 * c-parser.c (c_parser_set_source_position_from_token): Remove
2018 reference to in_system_header from comment.
2019
386b1f1f
RS
20202013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2021
2022 * c-decl.c (grokdeclarator): Update comment to refer to
2023 tree_to_[su]hwi rather than tree_low_cst.
2024
ae7e9ddd
RS
20252013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2026
2027 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2028 tree_to_uhwi throughout.
2029
9439e9a1
RS
20302013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2031
2032 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2033 throughout.
2034
9541ffee
RS
20352013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2036
2037 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2038 throughout.
2039
c02065fc
AH
20402013-11-15 Aldy Hernandez <aldyh@redhat.com>
2041
2042 * c-parser.c (c_parser_cilk_simd): New.
2043 (c_parser_cilk_verify_simd): New.
2044 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2045 (c_parser_omp_for_loop): Add case for NE_EXPR.
2046 Set c_break_label for CILK_SIMD.
2047 (c_parser_cilk_clause_vectorlength): New.
2048 (c_parser_cilk_clause_linear): New.
2049 (c_parser_cilk_clause_name): New.
2050 (c_parser_cilk_all_clauses): New.
2051 * c-typeck.c (build_unary_op): Pass location argument to
2052 readonly_error.
2053 (build_modify_expr): Same.
2054 (build_asm_expr): Same.
2055 (c_finish_bc_stmt): Error on break/continue in loops.
2056
18f429e2
AM
20572013-11-14 Andrew MacLeod <amacleod@redhat.com>
2058
2059 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2060
d8a2d370
DN
20612013-11-14 Diego Novillo <dnovillo@google.com>
2062
2063 * c-decl.c: Include print-tree.h.
2064 Include stor-layout.h.
2065 Include varasm.h.
2066 Include attribs.h.
2067 Include stringpool.h.
2068 * c-lang.c: Include fold-const.h.
2069 * c-parser.c: Include stringpool.h.
2070 Include attribs.h.
2071 Include stor-layout.h.
2072 Include varasm.h.
2073 Include trans-mem.h.
2074 * c-typeck.c: Include stor-layout.h.
2075 Include trans-mem.h.
2076 Include varasm.h.
2077 Include stmt.h.
2078
38b7bc7f
JM
20792013-11-13 Joseph Myers <joseph@codesourcery.com>
2080
2081 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2082 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2083 __auto_type.
2084 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2085 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2086 RID_AUTO_TYPE.
2087 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2088 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2089 (c_parser_declarator, c_parser_direct_declarator_inner)
2090 (c_parser_parameter_declaration, c_parser_type_name): All callers
2091 changed.
2092 (c_parser_declaration_or_fndef): Handle declarations with type
2093 determined from the initializer.
2094
45b0be94
AM
20952013-11-12 Andrew MacLeod <amacleod@redhat.com>
2096
18f429e2 2097 * c-typeck.c: Include gimplify.h.
45b0be94 2098
582d9b50
JM
20992013-11-12 Joseph Myers <joseph@codesourcery.com>
2100
2101 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2102 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2103 comment.
2104 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2105 or _Thread_local as appropriate in diagnostics.
2106 (build_null_declspecs): Initialize ret->thread_gnu_p.
2107 (declspecs_add_scspec): Handle either __thread or _Thread_local
2108 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2109 pedantic. Do not disallow _Thread_local extern and _Thread_local
2110 static.
2111
267bac10
JM
21122013-11-07 Joseph Myers <joseph@codesourcery.com>
2113 Andrew MacLeod <amacleod@redhat.com>
2114
2115 * c-aux-info.c (gen_type): Handle atomic qualifier.
2116 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2117 qualifiers when compating types.
2118 (shadow_tag_warned): Handle atomic_p in declspecs.
2119 (quals_from_declspecs): Likewise.
2120 (start_decl): Use c_type_promotes_to when promoting argument
2121 types.
2122 (grokdeclarator): Handle _Atomic.
2123 (get_parm_info): Diagnose any qualifier on "void" as only
2124 parameter.
2125 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2126 comparing types. Use c_type_promotes_to when promoting argument
2127 types.
2128 (finish_function): Use c_type_promotes_to when promoting argument
2129 types.
2130 (build_null_declspecs): Handle atomic_p in declspecs.
2131 (declspecs_add_qual): Handle RID_ATOMIC.
2132 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2133 (c_token_starts_declspecs): Handle RID_ATOMIC.
2134 (c_parser_declspecs): Handle atomic type specifiers and
2135 qualifiers.
2136 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2137 from types of expressions with atomic type.
2138 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2139 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2140 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2141 (c_parser_statement_after_labels, c_parser_switch_statement)
2142 (c_parser_for_statement, c_parser_expr_no_commas)
2143 (c_parser_conditional_expression, c_parser_binary_expression)
2144 (c_parser_cast_expression, c_parser_unary_expression)
2145 (c_parser_postfix_expression)
2146 (c_parser_postfix_expression_after_primary, c_parser_expression):
2147 Use convert_lvalue_to_rvalue.
2148 (c_parser_expression_conv, c_parser_expr_list): Document
2149 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2150 (c_parser_objc_synchronized_statement): Use
2151 convert_lvalue_to_rvalue.
2152 (c_parser_objc_selector): Handle RID_ATOMIC.
2153 (c_parser_objc_receiver, c_parser_array_notation): Use
2154 convert_lvalue_to_rvalue.
2155 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2156 _Atomic (type-name).
2157 (struct c_declspecs): Add atomic_p field.
2158 (convert_lvalue_to_rvalue): Declare.
2159 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2160 corresponding atomic types.
2161 (qualify_type): Don't add _Atomic qualifiers from second argument.
2162 (comp_target_types): Do not allow _Atomic mismatches.
2163 (type_lists_compatible_p): Do not remove atomic qualifiers when
2164 comparing types.
2165 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2166 (build_atomic_assign): New functions.
2167 (build_unary_op): Use build_atomic_assign for atomic increment and
2168 decrement.
2169 (build_conditional_expr): Do not treat _Atomic void as a qualified
2170 version of void.
2171 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2172 (find_anonymous_field_with_type, convert_to_anonymous_field)
2173 (convert_for_assignment): Do not remove atomic qualifiers when
2174 comparing types.
2175 (digest_init): Do not accept initialization of arrays of atomic
2176 elements by string constants.
2177 (build_asm_expr): Use convert_lvalue_to_rvalue.
2178 (build_binary_op): Do not treat _Atomic void as a qualified
2179 version of void.
2180
0c249d4b
DD
21812013-11-06 DJ Delorie <dj@redhat.com>
2182
2183 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2184 both explicit and builtin, print the location of the explicit one.
2185
6d7f7e0a
TB
21862013-11-05 Tobias Burnus <burnus@net-b.de>
2187
2188 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2189 c_parser_omp_distribute, c_parser_omp_teams,
2190 c_parser_omp_target, c_parser_omp_declare): Handle
2191 -fopenmp-simd.
2192
b906f4ca
MP
21932013-11-03 Marek Polacek <polacek@redhat.com>
2194
2195 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2196
ee1d5a02
JJ
21972013-11-01 Jakub Jelinek <jakub@redhat.com>
2198
2199 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2200 check_dup_generic at the end, unless remove is true.
2201 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2202 remove = true;.
2203 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2204
5a9785fb
JJ
22052013-10-31 Jakub Jelinek <jakub@redhat.com>
2206
2207 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2208 with decl that is not pointer nor array.
2209
939b37da
BI
22102013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2211
2212 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2213 a spawning function is found.
2214 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2215 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2216 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2217 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2218 case.
2219 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2220 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2221 expr.
2222 (c_finish_return): Added a check to reject _Cilk_spawn in return
2223 expression.
2224 (build_cilk_spawn): New function.
2225 (build_cilk_sync): Likewise.
2226 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2227
d4af74d4
TB
22282013-10-27 Tobias Burnus <burnus@net-b.de>
2229
2230 PR other/33426
2231 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2232 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2233 (c_parser_statement_after_labels): Update calls.
2234
d73749df 22352013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
2236
2237 PR other/33426
2238 * c-parser.c (c_parser_pragma, c_parser_for_statement):
2239 Handle PRAGMA_IVDEP.
2240 (c_parser_statement_after_labels): Update call.
2241
f28aa681
MP
22422013-10-24 Marek Polacek <polacek@redhat.com>
2243
2244 * c-parser.c (c_parser_struct_declaration): Add a comment.
2245 (c_parser_declarator): Don't allow _Alignas here.
2246
0645c1a2
AM
22472013-10-17 Andrew MacLeod <amacleod@redhat.com>
2248
2249 * c-parser.c: Include omp-low.h.
2250 * c-typeck.c: Likewise.
2251
568a31f2
MP
22522013-10-17 Marek Polacek <polacek@redhat.com>
2253
2254 PR c/58267
2255 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
2256 Document syntax of the array-declarator.
2257 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
2258 are not permitted.
2259 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
2260 (c_parser_struct_declaration): Likewise.
2261 (c_parser_declarator): Likewise.
2262 (c_parser_direct_declarator_inner): Likewise.
2263 (c_parser_parameter_declaration): Likewise.
2264 (c_parser_type_name): Likewise.
2265
acf0174b
JJ
22662013-10-11 Jakub Jelinek <jakub@redhat.com>
2267
2268 * c-lang.h (current_omp_declare_target_attribute): New extern
2269 decl.
2270 * c-parser.c: Include c-lang.h.
2271 (struct c_parser): Change tokens to c_token *.
2272 Add tokens_buf field. Change tokens_avail type to unsigned int.
2273 (c_parser_consume_token): If parser->tokens isn't
2274 &parser->tokens_buf[0], increment parser->tokens.
2275 (c_parser_consume_pragma): Likewise.
2276 (enum pragma_context): Add pragma_struct and pragma_param.
2277 (c_parser_external_declaration): Adjust
2278 c_parser_declaration_or_fndef caller.
2279 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
2280 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
2281 Adjust recursive call.
2282 (c_parser_struct_or_union_specifier): Use pragma_struct instead
2283 of pragma_external.
2284 (c_parser_parameter_declaration): Use pragma_param instead of
2285 pragma_external.
2286 (c_parser_compound_statement_nostart, c_parser_label,
2287 c_parser_for_statement): Adjust
2288 c_parser_declaration_or_fndef callers.
2289 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
2290 it through to c_parser_conditional_expression.
2291 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
2292 pass it through to c_parser_binary_expression. Adjust recursive
2293 call.
2294 (c_parser_binary_expression): Remove prec argument, add
2295 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
2296 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
2297 binop matches it, use build2 instead of parser_build_binary_op.
2298 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
2299 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
2300 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
2301 Handle pragma_struct and pragma_param the same as pragma_external.
2302 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
2303 (c_parser_omp_variable_list): Parse array sections for
2304 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
2305 (c_parser_omp_clause_collapse): Fully fold collapse expression.
2306 (c_parser_omp_clause_reduction): Handle user defined reductions.
2307 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
2308 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
2309 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
2310 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
2311 c_parser_omp_clause_depend, c_parser_omp_clause_map,
2312 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
2313 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
2314 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
2315 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
2316 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
2317 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
2318 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
2319 (c_parser_omp_for_loop): Add CODE argument, pass it through
2320 to c_finish_omp_for. Change last argument to cclauses,
2321 and adjust uses to grab parallel clauses from the array of all
2322 the split clauses. Adjust c_parser_binary_expression,
2323 c_parser_declaration_or_fndef and c_finish_omp_for callers.
2324 (omp_split_clauses): New function.
2325 (c_parser_omp_simd): New function.
2326 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
2327 Allow the function to be called also when parsing combined constructs,
2328 and call c_parser_omp_simd when parsing for simd.
2329 (c_parser_omp_sections_scope): If section-sequence doesn't start with
2330 #pragma omp section, require exactly one structured-block instead of
2331 sequence of statements.
2332 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
2333 Allow the function to be called also when parsing combined constructs.
2334 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
2335 Allow the function to be called also when parsing combined
2336 constructs.
2337 (c_parser_omp_taskgroup, c_parser_omp_cancel,
2338 c_parser_omp_cancellation_point, c_parser_omp_distribute,
2339 c_parser_omp_teams, c_parser_omp_target_data,
2340 c_parser_omp_target_update, c_parser_omp_target,
2341 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
2342 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
2343 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
2344 (c_parser_omp_construct): Add p_name and mask vars. Handle
2345 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
2346 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
2347 and c_parser_omp_sections callers.
2348 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
2349 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2350 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
2351 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
2352 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
2353 OMP_CLAUSE_DEPEND.
2354 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
2355 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
2356 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
2357 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
2358 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
2359 * c-typeck.c: Include tree-inline.h.
2360 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
2361 handle_omp_array_sections_1, handle_omp_array_sections,
2362 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
2363 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
2364 user defined reductions.
2365 (c_tree_equal): New function.
2366 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
2367 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
2368 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
2369 c_check_omp_declare_reduction_r): New prototypes.
2370 * c-decl.c (current_omp_declare_target_attribute): New variable.
2371 (c_decl_attributes): New function.
2372 (start_decl, start_function): Use it instead of decl_attributes.
2373 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
2374 c_omp_reduction_decl, c_omp_reduction_lookup,
2375 c_check_omp_declare_reduction_r): New functions.
2376
0a6c2227
TT
23772013-09-25 Tom Tromey <tromey@redhat.com>
2378
2379 * Make-lang.in (c/gccspec.o): Remove.
2380 (CFLAGS-c/gccspec.o): New variable.
2381 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
2382 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
2383 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2384
f3bc55f0
TT
23852013-09-25 Tom Tromey <tromey@redhat.com>
2386
2387 * Make-lang.in (c/gccspec.o): Don't use subshell.
2388
a24d975c
MP
23892013-09-18 Marek Polacek <polacek@redhat.com>
2390
2391 PR sanitize/58443
2392 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2393 Remove unnecessary check.
2394
ce6923c5
MP
23952013-09-18 Marek Polacek <polacek@redhat.com>
2396
2397 PR sanitizer/58411
2398 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
2399 no_sanitize_undefined attribute.
2400
a1e51df9
KT
24012013-09-13 Kai Tietz <ktietz@redhat.com>
2402
2403 PR target/57848
2404 * c-decl.c (c_builtin_function_ext_scope): Remove
2405 wrong assumption that it is never called on prexisting
2406 symbol.
2407
0af94e6f
JR
24082013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
2409
2410 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2411
20059c8b
GDR
24122013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2413
2414 * c-objc-common.c (c_tree_printer): Tidy.
2415
de5a5fa1
MP
24162013-08-30 Marek Polacek <polacek@redhat.com>
2417
2418 * c-typeck.c (build_binary_op): Add division by zero and shift
2419 instrumentation.
2420
2531a1d9 24212013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 2422 Joseph Myers <joseph@codesourcery.com>
2531a1d9 2423
6e2bcc98 2424 PR c/35649
2531a1d9
JR
2425 * c-typeck.c (c_common_type): Prefer double_type_node over
2426 other REAL_TYPE types with the same precision.
2427 (convert_arguments): Likewise.
2428
025311c4
GDR
24292013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2430
2431 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2432 (c_initialize_diagnostics): Call a destructor for the early printer.
2433
da6ca2b5
GDR
24342013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2435
2436 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2437 printer initialization.
2438
318cda85 24392013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 2440
318cda85
BI
2441 PR c/57490
2442 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2443 check for truth values.
2444 (expand_array_notation_exprs): Added truth values case. Removed an
2445 unwanted else. Added for-loop to walk through subtrees in default
2446 case.
2447
b066401f
GDR
24482013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2449
2450 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2451
fb48aadc
JM
24522013-07-23 Joseph Myers <joseph@codesourcery.com>
2453
2454 * c-parser.c (struct c_generic_association): Fix typo.
2455
433cc7b0
TT
24562013-07-23 Tom Tromey <tromey@redhat.com>
2457 Joseph Myers <joseph@codesourcery.com>
2458
2459 * c-parser.c (struct c_generic_association): New.
2460 (c_generic_association_d): New typedef.
2461 (c_parser_generic_selection): New function.
2462 (c_parser_postfix_expression): Handle RID_GENERIC.
2463
26d40c3d
JM
24642013-07-13 Jason Merrill <jason@redhat.com>
2465
2466 PR c++/57793
2467 * c-decl.c (finish_struct): Check for too-large class.
2468
ecdbd01a 24692013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
2470
2471 PR c/57821
2472 * c-typeck.c (set_init_index): When folding, check for index overflow.
2473
1141ed3f
BI
24742013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2475
2476 * c-parser.c (c_parser_array_notation): Removed rejection of array
2477 notations in an array of function pointers.
2478
713b46fa
BI
24792013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2480
2481 * c-array-notation.c (make_triplet_val_inv): New function.
2482 (create_cmp_incr): Likewise.
2483 (create_array_refs): Likewise.
2484 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2485 Also modularized common parts between functions and called the function.
2486 (build_array_notation_expr): Likewise.
2487 (fix_conditional_array_notations_1): Likewise.
2488 (fix_array_notation_expr): Likewise.
2489 (fix_array_notation_call_expr): Likewise.
2490
92f20202
MP
24912013-06-18 Marek Polacek <polacek@redhat.com>
2492
2493 PR c/57630
2494 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2495
73a23b06
BI
24962013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2497
2498 * c-array-notation.c (build_array_notation_expr): Reject array notation
2499 mismatch between LHS and RHS even inside a call_expr. Also, removed
2500 a couple while statements that were dead code.
2501
00b8517d
BI
25022013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2503
2504 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2505 excessive precision expressions in function parameters. Also removed
2506 couple unwanted while statements.
2507
1509bdda
BI
25082013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2509
2510 * c-array-notation.c (expand_array_notation_exprs): Added
2511 ARRAY_NOTATION_REF case.
2512
d60f1706
BI
25132013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2514
2515 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2516 function to c-family/array-notation-common.c.
2517 (is_cilkplus_reduce_builtin): Likewise.
2518 (find_rank): Likewise.
2519 (extract_array_notation_exprs): Likewise.
2520 (replace_array_notations): Likewise.
2521 (find_inv_trees): Likewise.
2522 (replace_inv_trees): Likewise.
2523 (contains_array_notation_expr): Likewise.
2524 (find_correct_array_notation_type): Likewise.
2525 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2526 (struct inv_list): Moved this to c-family/array-notation-common.c.
2527 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2528
6d6efbb3
BI
25292013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2530
2531 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2532 reduction functions outside the for-loop. Added a check if the fundecl
2533 is non-NULL. Finally, removed an unwanted if-statement, and made the
2534 body unconditional.
2535
25c22937
BI
25362013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2537
2538 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2539 condition of the if-statement matches the rank of else-block and then-
2540 block when array notations are used.
2541 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2542 expression after the entire function body is parsed.
2543 (c_parser_expr_no_commas): Delayed creating array notation expressions
2544 to the end of function parsing.
2545 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2546 whole if-statement instead of just the condition.
2547 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2548
edd25645
BI
25492013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2550
2551 PR c/57474
2552 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2553 array to NULL_TREE if they are unused. Also added a check for the
2554 field to be NULL before its fields are used in future.
2555
065ce7f1
RO
25562013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2557
2558 PR bootstrap/57450
2559 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2560 (build_array_notation_expr): Likewise.
2561
36536d79
BI
25622013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2563
2564 * c-typeck.c (build_array_ref): Added a check to see if array's
2565 index is greater than one. If true, then emit an error.
2566 (build_function_call_vec): Exclude error reporting and checking
2567 for builtin array-notation functions.
2568 (convert_arguments): Likewise.
2569 (c_finish_return): Added a check for array notations as a return
2570 expression. If true, then emit an error.
2571 (c_finish_loop): Added a check for array notations in a loop
2572 condition. If true then emit an error.
2573 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2574 (build_binary_op): Added a check for array notation expr inside
2575 op1 and op0. If present, we call another function to find correct
2576 type.
2577 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2578 * c-parser.c (c_parser_compound_statement): Check if array
2579 notation code is used in tree, if so, then transform them into
2580 appropriate C code.
2581 (c_parser_expr_no_commas): Check if array notation is used in LHS
2582 or RHS, if so, then build array notation expression instead of
2583 regular modify.
2584 (c_parser_postfix_expression_after_primary): Added a check for
2585 colon(s) after square braces, if so then handle it like an array
2586 notation. Also, break up array notations in unary op if found.
2587 (c_parser_direct_declarator_inner): Added a check for array
2588 notation.
2589 (c_parser_compound_statement): Added a check for array notation in
2590 a stmt. If one is present, then expand array notation expr.
2591 (c_parser_if_statement): Likewise.
2592 (c_parser_switch_statement): Added a check for array notations in
2593 a switch statement's condition. If true, then output an error.
2594 (c_parser_while_statement): Similarly, but for a while.
2595 (c_parser_do_statement): Similarly, but for a do-while.
2596 (c_parser_for_statement): Similarly, but for a for-loop.
2597 (c_parser_unary_expression): Check if array notation is used in a
2598 pre-increment or pre-decrement expression. If true, then expand
2599 them.
2600 (c_parser_array_notation): New function.
2601 * c-array-notation.c: New file.
2602 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2603
cd192ccc
MS
26042013-05-23 Mike Stump <mikestump@comcast.net>
2605
2606 * c-typeck.c (convert_for_assignment): Handle references to memory
2607 spaces better.
2608
427b248d
JM
26092013-05-16 Jason Merrill <jason@redhat.com>
2610
2611 * Make-lang.in (cc1$(exeext)): Use link mutex.
2612
44d90fe1
PC
26132013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2614
2615 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2616 to simply use OPT_Wpointer_arith.
2617 (build_unary_op): Likewise.
2618
4e7d7b3d
JJ
26192013-04-03 Jakub Jelinek <jakub@redhat.com>
2620
2621 PR c/19449
2622 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2623 argument. If set, or it temporarily for parsing of the first
2624 argument into force_folding_builtin_constant_p.
2625 (c_parser_postfix_expression): Adjust callers.
2626
839b422f
RB
26272013-03-21 Richard Biener <rguenther@suse.de>
2628
2629 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2630 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2631
2ee028f1
MP
26322013-02-12 Marek Polacek <polacek@redhat.com>
2633
2634 PR c/44938
2635 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2636 origtypes to NULL.
2637
8824edff
JJ
26382013-01-24 Jakub Jelinek <jakub@redhat.com>
2639
2640 PR c/56078
2641 * c-typeck.c (set_nonincremental_init_from_string): If
2642 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2643 returned false.
2644 (process_init_element): Likewise.
2645
eadd3d0d
JJ
26462012-12-20 Jakub Jelinek <jakub@redhat.com>
2647
2648 PR c++/55619
2649 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2650 argument, don't call default_function_array_conversion
2651 nor c_fully_fold here.
2652 (c_parser_asm_statement): Adjust callers.
2653 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2654 and outputs here, and call default_function_array_conversion
2655 on inputs that don't need to be addressable.
2656
f8a93a2e
JJ
26572012-12-18 Jakub Jelinek <jakub@redhat.com>
2658
2659 PR c/39464
2660 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2661 warning require that both c_common_unsigned_type as well as
2662 c_common_signed_type is the same for both mvl and mvr types.
2663
9771b263
DN
26642012-11-16 Diego Novillo <dnovillo@google.com>
2665
2666 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2667
2668 * c-common.c: Use new vec API in vec.h.
2669 * c-common.h: Likewise.
2670 * c-gimplify.c: Likewise.
2671 * c-pragma.c: Likewise.
2672 * c-pretty-print.c: Likewise.
2673 * c-pretty-print.h: Likewise.
2674 * c-semantics.c: Likewise.
2675 * c-decl.c: Likewise.
2676 * c-parser.c: Likewise.
2677 * c-tree.h: Likewise.
2678 * c-typeck.c: Likewise.
2679
880661a4
JW
26802012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2681
2682 PR c++/54930
2683 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2684
077d1abe
MLI
26852012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2686
2687 PR c/53066
2688 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2689 shadows a function, unless the variable is a function or a
2690 pointer-to-function.
2691
3a785c97
JJ
26922012-10-12 Jakub Jelinek <jakub@redhat.com>
2693
2694 PR c/54381
2695 * c-parser.c (struct c_tree_loc_pair): Removed.
2696 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2697 add location_t * and tree * arguments, fill in array of 3
2698 sizeof_arg trees and corresponding locs.
2699 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2700 c_parser_expr_list callers.
2701 (c_parser_postfix_expression_after_primary): Likewise. Pass
2702 array of 3 sizeof_arg trees and locs (corresponding to first
2703 3 arguments) to sizeof_pointer_memaccess_warning.
2704
703c8606
LC
27052012-10-09 Lawrence Crowl <crowl@google.com>
2706
2707 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2708 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2709 hash table.
2710
5d9de0d0
PC
27112012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2712
2713 PR c++/54194
2714 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2715 call.
2716
a212e43f
MG
27172012-10-09 Marc Glisse <marc.glisse@inria.fr>
2718
2719 PR c++/54427
2720 * c-typeck.c: Include c-common.h.
2721 (enum stv_conv): Moved to c-common.h.
2722 (scalar_to_vector): Moved to c-common.c.
2723 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2724 * Make-lang.in: c-typeck.c depends on c-common.h.
2725
3b78de56
AC
27262012-10-04 Arnaud Charlet <charlet@adacore.com>
2727
2728 * c-decl.c (c_write_global_declarations): Fix handling of
2729 -fdump-ada-spec*.
2730
78c60e3d
SS
27312012-09-30 Sharad Singhai <singhai@google.com>
2732
2733 * c-decl.c (c_write_global_declarations): Use a different method
2734 to determine if the dump has ben initialized.
2735
9f33203d
JM
27362012-09-14 Joseph Myers <joseph@codesourcery.com>
2737
2738 PR c/54552
2739 * c-typeck.c (c_cast_expr): When casting to a type requiring
2740 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2741 c_fully_fold first.
2742
a27d595d
JM
27432012-09-14 Joseph Myers <joseph@codesourcery.com>
2744
2745 PR c/54103
2746 * c-typeck.c (build_unary_op): Pass original argument of
2747 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2748 any C_MAYBE_CONST_EXPR, if it has integer operands.
2749 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2750 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2751 to c_objc_common_truthvalue_conversion, then remove any
2752 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2753 c_objc_common_truthvalue_conversion not
2754 c_common_truthvalue_conversion.
2755 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2756 call note_integer_operands for arguments with integer operands
2757 that are not integer constants.
2758
9feb29df
JJ
27592012-09-13 Jakub Jelinek <jakub@redhat.com>
2760
2761 PR c/54559
2762 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2763 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2764
d409320c
JJ
27652012-08-31 Jakub Jelinek <jakub@redhat.com>
2766
2767 PR c/54428
2768 * c-convert.c (convert): Don't call fold_convert_loc if
2769 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2770 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2771 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2772
6265d07c
JJ
27732012-08-24 Jakub Jelinek <jakub@redhat.com>
2774
2775 PR c/54355
2776 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2777 for nested and empty_ok arguments in the call to
2778 c_parser_declaration_or_fndef.
2779
1a4049e7
JJ
27802012-08-17 Jakub Jelinek <jakub@redhat.com>
2781
2782 * c-tree.h (c_last_sizeof_arg): Declare.
2783 * c-parser.c (struct c_tree_loc_pair): New type.
2784 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2785 non-NULL.
2786 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2787 (c_parser_postfix_expression_after_primary): Likewise. Call
2788 sizeof_pointer_memaccess_warning if needed.
2789 (sizeof_ptr_memacc_comptypes): New function.
2790 * c-typeck.c (c_last_sizeof_arg): New global variable.
2791 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2792
0229aee9
UB
27932012-07-24 Uros Bizjak <ubizjak@gmail.com>
2794
2795 * c-lang.h (lang_decl): Add variable_size GTY option.
2796
7ee2468b
SB
27972012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2798
2799 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2800 * Make-lang.in: Fix dependencies.
2801
d4a10d0a
SB
28022012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2803
2804 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2805 and add language Makefile hooks.
2806 * config-lang.in: New file.
2807 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2808 add the required "normal" config-lang.in rules.
2809 * c-lang.h: Moved from gcc/ to here.
2810 * c-tree.h: Likewise.
2811 * c-objc-common.c: Likewise.
2812 * c-objc-common.h: Likewise.
2813 * c-typeck.c: Likewise.
2814 * c-convert.c: Likewise.
2815 * c-lang.c: Likewise.
2816 * c-aux-info.c: Likewise.
2817 * c-errors.c: Likewise.
2818 * gccspec.c: Likewise.
2819 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2820 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2821\f
5624e564 2822Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
2823
2824Copying and distribution of this file, with or without modification,
2825are permitted in any medium without royalty provided the copyright
2826notice and this notice are preserved.
This page took 1.140476 seconds and 5 git commands to generate.